<?php

	// Create a new database
	$db = new SQLite3('bd.db');

	//$db->open();
	
	$db->exec('CREATE TABLE users (
				user_id INTEGER PRIMARY KEY AUTOINCREMENT,
				first_name VARCHAR(255) NOT NULL,
				last_name VARCHAR(255) NOT NULL
				)
			');
	$db->exec('CREATE TABLE activities (
			activity_id INTEGER PRIMARY KEY AUTOINCREMENT,
			location_given INTEGER,
			max_people INTEGER,
			min_people INTEGER,
			max_minutes INTEGER,
			min_minutes INTEGER,
			name VARCHAR(255) NOT NULL,
			description TEXT NOT NULL,
			latitude REAL,
			longitude REAL
		)');
	$db->exec('CREATE TABLE ratings (
		rating_id INTEGER PRIMARY_KEY AUTOINCREMENT , 
		user_ID INTEGER, 
		activity_ID INTEGER, 
		rating REAL
		)');
	
	//echo "Database Created...";
	
	$
?>